/*
输入内容弹框
使用方法：
mPrompt({
	placeholder: '请输入驳回原因',
	check: value => {
		return !value ? '请输入驳回原因' : '';
	},
	onOk: value => {
		console.log(value);
	}
})
*/

import {createApp} from "vue";
import PromptComponent from "./index.vue";


const mPrompt = (options) => {
	const promptApp = createApp(PromptComponent, options);
	// 显示弹窗
	showPrompt(promptApp)
}

const showPrompt = (app) => {
	const oFrag = document.createDocumentFragment();
	const vm = app.mount(oFrag);
	document.body.appendChild(oFrag);
	vm.open();
}

export default mPrompt;









